Public Function GetWizardInfo(Names As Variant) As Long
ReDim Names(NUM_WIZARDS)
GetWizardInfo = NUM_WIZARDS
End Function
'Enumerate the names and values of a specified property
Public Function GetEnumNames(ByVal PropID As Long, Names As Variant, Values As Variant) As Long
GetEnumNames = 0
End Function
Public Function PageControls(ByVal ThisRegenMethod As Object, ByVal Graphic As Object, ByVal PageNumber As Long, ByVal SaveProperties As Boolean) As Boolean
'Set up error function
On Error GoTo Failed
Dim Diameter#, Length#, LengthThread#
If SaveProperties Then
'OK button on property page was clicked
'Form is still loaded
With frmHole
'Need On Error statement for the case where you have
'RRect Turbo Shape and ahother "shape" selected
On Error Resume Next
'When the property page is closed, transfer the numeric
'Diameter value from the TextBox to the Graphic
'Get the value as a double-precision number
Diameter# = CDbl(.txtdd.Text)
Length# = CDbl(.txtLen.Text)
LengthThread# = CDbl(.txtThread.Text)
TypeH = .List1.Text
' ViewH = .List2.Text
'Make sure it's between 0 and 100
If Diameter# < 0# Then Diameter# = 1#
If Diameter# > 3# Then Diameter# = 3#
If LengthThread > Length Then LengthThread = Length
If Abs(dd - ddOld) > 0.001 Or Abs(LenProp - LenOld) > 0.001 Or Abs(LenPropThread - LenThreadOld) > 0.001 Or TypeH <> TypeHOld Or ViewH <> ViewHOld Then
If ViewH = "FrontSection" And (ViewHOld = "Front" Or ViewHOld = "Top") Then
Dim Calp2#, Salp2#
Calp2 = Calp
Salp2 = Salp
Calp = Salp2
Salp = -Calp2
X01 = X00 + LenProp * Calp
Y01 = Y00 + LenProp * Salp
With grfThis.Vertices
.Item(1).X = X01
.Item(1).Y = Y01
L = LenProp
End With
X02 = X00 + (X01 - X00) * LenPropThread / LenProp
Y02 = Y00 + (Y01 - Y00) * LenPropThread / LenProp
With grfThis.Vertices
.Item(2).X = X02
.Item(2).Y = Y02
End With
End If
If Abs(LenProp - LenOld) > 0.001 And ViewH = ViewHOld Then
X01 = X00 + LenProp * Calp
Y01 = Y00 + LenProp * Salp
With grfThis.Vertices
.Item(1).X = X01
.Item(1).Y = Y01
L = LenProp
End With
End If
If Abs(LenPropThread - LenThreadOld) > 0.001 And ViewH = ViewHOld Then
Public Function Draw(ByVal grfThis As Object, ByVal view As Object, Optional mat As Variant) As Boolean
'Return True if we did the redraw (no further processing necessary, no children will be drawn).
'Since this is just a test, we return False to let TurboCAD do the drawing operation.
Draw = False
End Function
Private Function Angle(sinb As Double, cosb As Double) As Double
If Abs(cosb) < 0.0001 Then
If sinb > 0 Then
Angle = Pi / 2
Else
Angle = 3 * Pi / 2
End If
Else
If sinb >= 0 And cosb > 0 Then Angle = Atn(sinb / cosb)
If sinb >= 0 And cosb < 0 Then Angle = Pi + Atn(sinb / cosb)
If sinb < 0 And cosb < 0 Then Angle = Pi + Atn(sinb / cosb)
If sinb < 0 And cosb > 0 Then Angle = 2 * Pi + Atn(sinb / cosb)
End If
End Function
Private Sub Hole1(Gr As Graphic, dd As Double, L As Double, Salp As Double, Calp As Double, ScrewView As String, ScrewViewOld As String, LThread As Double)
Private Sub Hole2(Gr As Graphic, dd As Double, L As Double, Salp As Double, Calp As Double, ScrewView As String, ScrewViewOld As String, LThread As Double)
Private Sub Hole3(Gr As Graphic, dd As Double, L As Double, Salp As Double, Calp As Double, ScrewView As String, ScrewViewOld As String, LThread As Double)
Private Sub Hole4(Gr As Graphic, dd As Double, L As Double, Salp As Double, Calp As Double, ScrewView As String, ScrewViewOld As String, LThread As Double)
Private Sub Hole5(Gr As Graphic, dd As Double, L As Double, Salp As Double, Calp As Double, ScrewView As String, ScrewViewOld As String, LThread As Double)